package com.zbkj.crmeb.store.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zbkj.crmeb.enums.AccountFlowTypeEnum;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 资金账户流水
 * @Description: 
 * @author daigb
 * @date 2021-09-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_account_flow")
@ApiModel(value="AccountFlow", description="资金账户流水")
public class AccountFlow implements Serializable {
    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商户id")
    private Integer merId;
    
    @ApiModelProperty(value = "第三方主键id")
    private Integer otId;
    
    @ApiModelProperty(value = "操作人id")
    private Integer operateId;
    
    @ApiModelProperty(value = "操作人ip")
    private String operateIp;
    
    @ApiModelProperty(value = "交易类型(1: 商品购买与退款 2: 商户充值与提现)")
    private AccountFlowTypeEnum tradeType;

    @ApiModelProperty(value = "余额交易金额(正数进, 负数出)")
    private BigDecimal account;
    
    @ApiModelProperty(value = "可提现交易金额(正数进, 负数出)")
    private BigDecimal withdrawAccount;
    
    @ApiModelProperty(value = "冻结交易金额(正数进, 负数出)")
    private BigDecimal freezeAccount;
    
    @ApiModelProperty(value = "当前余额")
    private BigDecimal nowAccount;
    
    @ApiModelProperty(value = "当前可提现余额")
    private BigDecimal nowWithdrawAccount;
    
    @ApiModelProperty(value = "当前冻结金额")
    private BigDecimal nowFreezeAccount;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

}
